package Prototype.Framework;

import java.util.HashMap;
import java.util.Map;

public class Manage {
    private Map<String, Product> ResumeCase = new HashMap<>();
    public void register(String name, Product product) {
        ResumeCase.put(name, product);
    }
    public Product create(String name, boolean isDeepCopy) {
        if(isDeepCopy) {
            return ResumeCase.get(name).createClone();
        } else {
            return ResumeCase.get(name);
        }
    }
}
